home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / FredFish PD 319.adf / CNewsSrc / uupc.lzh / U / rn.uedit < prev   
Text File  |  1990-02-06  |  3KB  |  93 lines

  1.  
  2. This command definition will read in the list of directories in which
  3. the C-News package keeps its' articles.
  4.  
  5. On the KeyPad:
  6.     *    normal-kpLparen        Next Article (same as gadget1)
  7.     *    normal-kpRparen        Prev Article (same as gadget2)
  8.  
  9.     Shft-kpLparen        Show list of articles after current
  10.     Shft-kpRparen        Show list of articles before current
  11.  
  12. On the Message Line:
  13.     *    normal-gadget1        Next Article
  14.     *    normal-gadget2        Prev Article
  15.     normal-gadget3        Post a followup
  16.     normal-gagdet4        Reply via e-mail
  17.  
  18.     Shft-gadget1        Show list of articles after current
  19.     Shft-gadget2        Show list of articles before current
  20. --------------------------------------------------------------------
  21. The Next/Prev gadgets (1 & 2) move the cursor in buf39 either up or
  22. down one line at a time looking for a line that begins with a digit.
  23. When found, they call "virtual-gadget1" which loads in the file on
  24. that line in the buffer.  If not found, they print a message about
  25. there not being any more articles in that direction.
  26. --------------------------------------------------------------------
  27. ..<Startup:
  28.     gadgetName(1, "Next Article")
  29.     gadgetName(2, "Prev Article")
  30.     >
  31. --------------------------------------------------------------------
  32. <normal-gadget1:
  33.     runKey(normal-kpLparen) >    ..Next Article
  34. <normal-gadget2:
  35.     runKey(normal-kpRparen) >    ..Prev Article
  36. <shft-gadget1:
  37.     runKey(normal-f1) >        ..Next File
  38. <shft-gadget2:
  39.     runKey(shft-f1) >        ..Prev File
  40. --------------------------------------------------------------------
  41. <normal-kpLparen:
  42.     if (isEmpty(buf39)) {
  43.         if (not runKey(virtual-gadget2))
  44.             returnFalse
  45.     } else {
  46.         moveCursor(buf39, sInvert)
  47.         moveCursor(buf39, downLine)
  48.     }
  49.     if (is(buf39, eFile)) {
  50.         putMsg("No more articles!")
  51.         returnFalse
  52.     }
  53.     runKey(virtual-gadget1)
  54.     >
  55. --------------------------------------------------------------------
  56. <normal-kpRparen:
  57.     if (isEmpty(buf39)) {
  58.         if (not runKey(virtual-gadget2))
  59.             returnFalse
  60.     } else
  61.         moveCursor(buf39, sInvert)
  62.     if (not moveCursor(buf39, upLine)) {
  63.         putMsg("No previous article!")
  64.         returnFalse
  65.     }
  66.     runKey(virtual-gadget1)
  67.     >
  68. --------------------------------------------------------------------
  69. <virtual-gadget1:
  70.     equateLoc(buf39, sInvert, atCursor)
  71.     moveCursor(buf39, eLine)
  72.     equateLoc(buf39, eInvert, atCursor)
  73.     moveCursor(buf39, eChar)
  74.  
  75.     freeBuf(buf54)
  76.     insertRgn(buf54, eFile, buf39, invert)
  77.  
  78.     if (not eqNum(n30, 0))
  79.         freeBuf(buf[n30])
  80.     if (loadFile(buf54))
  81.         equateNum(n30, curFile)
  82.     >
  83. --------------------------------------------------------------------
  84. <virtual-gadget2:
  85.     freeBuf(buf54)
  86.     if (not execute(buf39, "U:news_lart")) {
  87.         putMsg("Sorry.  No articles could be found.")
  88.         returnFalse
  89.     }
  90.     equateLoc(buf39, atCursor, sFile)
  91.     equateNum(n30, 0)
  92.     >
  93.